<template>
  <div>
      <van-nav-bar
         left-arrow
        class="app-nav-bar"
        title="异常处理详情页"
        @click-left="$router.back()"
      />
      <van-cell-group>
          <van-cell title="学号:" :value="tableData.studentNo" />
          <van-cell title="班级:" :value="tableData.className" />
          <van-cell title="学生姓名:" :value="tableData.studentName" />
          <van-cell title="宿舍:" :value="tableData.dorAddress" />
          <van-cell title="处理描述:" :value="tableData.processDesc" />
          <van-cell title="处理状态:">
            <template #default>
                <span style="margin-left:10px" v-if="tableData.absenceProcessStatus === '1'">联系不上</span>
                  <span style="margin-left:10px" v-if="tableData.absenceProcessStatus === '2'">已联系上确认迟到</span>
                  <span style="margin-left:10px" v-if="tableData.absenceProcessStatus === '3'">已联系上确认回家</span>
                  <span style="margin-left:10px" v-if="tableData.absenceProcessStatus === '4'">已联系上确认擅自离校需进一步处理</span>
            </template>
          </van-cell>
          <van-cell title="处理人:" :value="tableData.processPerson" />
          <van-cell title="处理时间:" :value="tableData.modifyTime" />
      </van-cell-group>
  </div>
</template>

<script>
export default {
    data(){
        return{
            tableData:[],
        }
    },
    methods:{
        async select(){
            var {data:res} = await this.$axios({
                url:this.$location.getAppExcById,
                params:{
                    id:this.$route.params.id
                }
            })
            // console.log(res.data);
            this.tableData = res.data;
        }
    },
    created(){
        this.select();
    }
}
</script>

<style lang="less" scoped>
    /deep/ .app-nav-bar{
        background-color: #35d299;
        .van-nav-bar__title{
            color: #fff;
        }
        .van-icon{
            color: #fff;
            
        }
    }
</style>